//
//  MSSexButton.m
//  觅尚
//
//  Created by No.8 on 2019/4/1.
//  Copyright © 2019 No.8. All rights reserved.
//

#import "MSSexButton.h"

@implementation MSSexButton

- (void)setup
{
    self.titleLabel.textAlignment = NSTextAlignmentCenter;
}

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        [self setup];
    }
    return self;
}

- (void)awakeFromNib
{
    [self setup];
}


- (void)layoutSubviews
{
    [super layoutSubviews];
    //    self.backgroundColor = [UIColor blackColor];
    // 调整图片
    self.imageView.x = 10 * px;
    self.imageView.y = 10 * px;
    self.imageView.width = 30 * px;
    self.imageView.height = 30 * px;
//    self.imageView.layer.cornerRadius = 30 * px;
    
    
    
    // 调整文字
    self.titleLabel.x = self.imageView.width;
    self.titleLabel.y = 0;
    self.titleLabel.width = self.width - self.imageView.width;
    self.titleLabel.height = self.height;
    
}

@end
